<include file="Public/header.html"/>
</head>
<body>
	<style>
		.layui-form-pane .layui-input-inline{width: 130px;}
		.layui-btn-xs{margin-left: 0 !important;}
	</style>
	<?php if($uid>0){ ?>
	<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="margin-left: 15px;">
	  	<ul class="layui-tab-title">
		    <li class="<?php if($flag==1){echo 'layui-this';}?>" >
				<a href="{:U('Home/Web/User/user_cash',array('flag'=>1,'uid'=>$uid))}">联通佣金</a>
			</li>
			<li class="<?php if($flag==2){echo 'layui-this';}?>" >
				<a href="{:U('Home/Web/User/user_cash',array('flag'=>2,'uid'=>$uid))}">其他佣金</a>
			</li>
	  	</ul>
  	</div>
  	<?php } ?>
    <div class="x-body">
    	<form class="layui-form x-center" action="{:U('Home/Web/User/user_cash',array('flag'=>$flag,'uid'=>$uid))}" method="post" style="width:95%;margin-left: 5%;">
	        <div class="layui-form-pane" style="margin-top: 15px;">
	          	<div class="layui-form-item">  
	          		<div class="layui-input-inline">
						<select name="type">
							<option value="">请选择类型</option>
							<option value="1" <?php if($type == 1){ echo 'selected'; } ?> >项目佣金</option>
	                        <option value="2" <?php if($type == 2){ echo 'selected'; } ?> >分销佣金</option>
						</select>
					</div>
					<?php if(empty($uid)){ ?>
	                <div class="layui-input-inline">
	                  	<input type="text" name="nickname" value="{$nickname}"  placeholder="请输入微信昵称" autocomplete="off" class="layui-input">
	                </div>
	                <?php } ?>
	                <div class="layui-input-inline">
	                  	<input type="text" name="title" value="{$title}"  placeholder="请输入项目名称" autocomplete="off" class="layui-input">
	                </div>
	               	<div class="layui-input-inline">
	                  	<input type="text" name="order_num" value="{$order_num}"  placeholder="请输入订单号" autocomplete="off" class="layui-input">
	                </div>
	                <?php if(true){ ?>	
	                <div class="layui-input-inline">
	                  	<input type="text" name="phone" value="{$phone}"  placeholder="请输入手机号" autocomplete="off" class="layui-input">
	                </div>
	                 <?php } ?>
	                <div class="layui-input-inline" style="width:80px">
	                    <button class="layui-btn" type="submit"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
	                </div>
	          	</div>
	        </div> 
	    </form>
      	<form id="delform" class="layui-form">    	 	
      	 	<table class="layui-table">     	 		
	            <thead>
	                <tr>
                    	<th>ID</th>
                    	<?php if(empty($uid)){ ?>
                    	<th>用户</th>
                    	<?php } ?>
                    	<th>项目</th>	
                    	<th>类型</th>
                    	<th>订单号</th>
                    	<?php if(true){ ?>
                    	<th>手机号</th>
                    	<th>阶段</th>
                    	<?php } ?>
	                	<th>佣金</th>
	                    <th>时间</th>	  
	                </tr>
	            </thead>
          
	            <tbody id="formdata">
	              	<volist name="list" id="v">	
	                <tr>
                    	<td>{$v.id}</td>
                    	<?php if(empty($uid)){ ?>
                    	<td>{$v.nickname}</td>
                    	<?php } ?>
                    	<td>{$v.title}</td>	
                    	<td>
	                    	<if condition="$v['type'] eq 1">
	                    		<font>项目佣金</font>
	                    	<elseif condition="$v['type'] eq 2" />
	                    		<font>分销佣金</font>
	                    	</if>
	                    </td>
	                    <td>{$v.order_num}</td>	
	                    <?php if(true){ ?>
                    	<td>{$v.phone}</td>
                    	<td><font color="green">T<?php echo $v['true_status']-1;?>审核</font></td>
                    	<?php } ?>
	                    <td>{$v.commission}</td>
	                    <td><?php echo date('Y-m-d H:i:s', $v['add_time']); ?></td>
	                </tr>
	              	</volist>  
	            </tbody>
            </table>
        </form>
        <span class="x-right" style="line-height:40px">共有数据：{$count} 条</span>
        <div id="page"></div>
    </div>
	<include file="Public/footer.html"/>
	<script src="__ROOT__/Public/js/jquery.wallform.js"></script>
	<script>    	
		layui.use(['form','element','laypage','layer'], function(){
			var laypage = layui.laypage;//分页
			var layer = layui.layer;//弹出层
			var form = layui.form;
			$ = layui.jquery; 
		  
			laypage.render({
				elem: 'page',
				count: '{$count}',
				limit: '{$limit}',
				curr : '{$page}', 
				jump: function(obj, first){
					if(!first){ 
						var $purl = "{:U('Home/Web/User/user_cash',array('page'=>'pageval','nickname'=>$nickname,'title'=>$title,'ordernum'=>$ordernum,'phone'=>$phone,'type'=>$type,'flag'=>$flag,'uid'=>$uid))}"
						window.location.href= $purl.replace('pageval',obj.curr);  			
					}
				}
			});
		});
	</script>  
	</div>	
</body>
</html>